<ul>
  <% cache article do %>
    <div class="card">
      <h3 class="card-header"><%= article.title %></h3>
      <h3>
        <%= truncate strip_tags(article.content), length: 80 %>
      </h3>
      <div id="text-right">
        <%= button_to '查看', article,
                      :method => :get, class: "btn btn-primary pull-right" %>
      </div>
      <div>
        <% if article.category.present? %>
          分类：<span class="badge badge-primary">
                        <%= article.category.name %>
                     </span>
        <% end %>
      </div>
      <p>最后修改时间: <%= edit_time(article) %></p>
      <p>作者： <%= article.user.name %></p>
    </div>
  <% end %>
</ul>
